package com.zte.claa.inficombo.csa.app.model.version;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;

public class DevVersionBase {
	private static final String DTFormat = "yyyy-MM-dd HH:mm:ss";
	public static final int TPFLAG_DEVVER = 1;
	public static final int TPFLAG_GPSEPH = 2;
	
    private String devtype; 	//		设备类型ID	VARCHAR(100)		N	主键
    private String version; 	//		版本编号	VARCHAR(100)		N	主键，星历文件：GPS_EP_Date
    private String devtpname; 	//		设备类型名称	VARCHAR(100)		N	
    private String devtpdescp; 	//		设备类型描述	VARCHAR(200)		Y	
    private int typeflag; 		//		版本类别	Int	1	N	1--终端版本；2--GPS星历；3--预留，待扩充
    
    @JsonFormat(pattern=DTFormat, timezone = "GMT+8")
    private Timestamp reltime; 	//		发布时间	Timestamp		Y	
	private int versize = 1; 	//		版本大小	Int	1	N	单位：Byte
	private int blocknum = 1; 	//		版本块数目	Int	1	N	
	private String crc32; 		//		CRC32校验和	VARCHAR(10)		Y	整个版本的校验和，十六进制数字字符串
	private String remark; 		//		备注	Varchar(200)		Y	
	private String filename;    // 版本文件名.
	
	public DevVersionBase(){
		
	}

	public String getDevtype() {
		return devtype;
	}

	public void setDevtype(String devtype) {
		this.devtype = devtype;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getDevtpname() {
		return devtpname;
	}

	public void setDevtpname(String devtpname) {
		this.devtpname = devtpname;
	}

	public String getDevtpdescp() {
		return devtpdescp;
	}

	public void setDevtpdescp(String devtpdescp) {
		this.devtpdescp = devtpdescp;
	}

	public int getTypeflag() {
		return typeflag;
	}

	public void setTypeflag(int typeflag) {
		this.typeflag = typeflag;
	}

	public Timestamp getReltime() {
		return reltime;
	}

	public void setReltime(Timestamp reltime) {
		this.reltime = reltime;
	}

	public int getVersize() {
		return versize;
	}

	public void setVersize(int versize) {
		this.versize = versize;
	}

	public int getBlocknum() {
		return blocknum;
	}

	public void setBlocknum(int blocknum) {
		this.blocknum = blocknum;
	}

	public String getCrc32() {
		return crc32;
	}

	public void setCrc32(String crc32) {
		this.crc32 = crc32;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("devtype=").append(this.devtype).append(", ");
		sb.append("version=").append(this.version).append(", ");
		sb.append("devtpname=").append(this.devtpname).append(", ");
		sb.append("devtpdescp=").append(this.devtpdescp).append(", ");
		sb.append("typeflag=").append(this.typeflag).append(", ");
		sb.append("reltime=").append(this.reltime).append(", ");
		sb.append("versize=").append(this.versize).append(", ");
		sb.append("blocknum=").append(this.blocknum).append(", ");
		sb.append("crc32=").append(this.crc32).append(", ");
		sb.append("filename=").append(this.filename).append(", ");		
		sb.append("remark=").append(this.remark);
		return sb.toString();
	}
}
